home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / CPlusPlus / FacetItr.xh < prev    next >
Encoding:
Text File  |  1997-02-13  |  4.9 KB  |  214 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: FacetItr.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined by this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODFacetIterator_xh
  18. #define SOM_ODFacetIterator_xh
  19.  
  20. class ODFacetIterator;
  21.  
  22. #define ODFacetIterator_MajorVersion 1
  23. #define ODFacetIterator_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_ODObject_xh
  31. #include <ODObject.xh>
  32. #endif
  33.  
  34. #ifndef ODFacetIterator_API
  35. #define ODFacetIterator_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of user-defined types:
  42.  */
  43. class SOMClass;
  44. class SOMObject;
  45. class ODFrame;
  46. class ODFacet;
  47. class ODObject;
  48. class ODExtension;
  49. class ODFacetIterator;
  50.  
  51. /*
  52.  * End of user-defined types.
  53.  */
  54.  
  55. #ifdef OLDIBMSOMAPISUPPORT
  56. #define ODFacetIteratorCClassData ODFacetIteratorClassData
  57. #define ODFacetIteratorNewClass(major,minor) somNewVersionedClassReference(ODFacetIterator,major,minor)
  58. #endif
  59.  
  60. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  61. #define ODFacetIteratorMetaClass SOMClass
  62.  
  63. #if PRAGMA_ALIGN_SUPPORTED
  64. #  pragma options align=power
  65. #endif
  66.  
  67. /* The API to the ODFacetIterator class object, and the methods it introduces. */
  68. SOMEXTERN struct ODFacetIteratorClassDataStructure {
  69. #ifdef OLDIBMSOMAPISUPPORT
  70.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  71. #else
  72.     long zero;
  73. #endif
  74.     somStaticClassInfo *sci;
  75.     somDToken        instanceDataToken;
  76.     long reserved [3];
  77.     somMToken First;
  78.     somMToken Next;
  79.     somMToken SkipChildren;
  80.     somMToken IsNotComplete;
  81.     somMToken reserved1;
  82. } SOMDLINK ODFacetIteratorClassData;
  83.  
  84. #if PRAGMA_ALIGN_SUPPORTED
  85. #  pragma options align=reset
  86. #endif
  87.  
  88. #if !defined(ODFacetIterator_Class_Source) && !defined(SOM_Module_facetitr_Source)
  89. #if PRAGMA_IMPORT_SUPPORTED
  90. #pragma import list ODFacetIteratorClassData
  91. #endif
  92. #endif
  93.  
  94.  
  95. /*
  96.  * -- Typedefs and inline method declarations for left path inherited methods
  97.  * -- are omitted because this compilation had -museinheritedmethods in effect
  98.  */
  99.  
  100.  
  101. /*
  102.  * -- Typedefs for ODFacetIterator Method Procedures
  103.  */
  104. SOMEXTERN {
  105. typedef ODFacet*   (* SOMLINK somTD_ODFacetIterator_First)(ODFacetIterator *somSelf, Environment *ev);
  106. typedef ODFacet*   (* SOMLINK somTD_ODFacetIterator_Next)(ODFacetIterator *somSelf, Environment *ev);
  107. typedef void   (* SOMLINK somTD_ODFacetIterator_SkipChildren)(ODFacetIterator *somSelf, Environment *ev);
  108. typedef ODBoolean   (* SOMLINK somTD_ODFacetIterator_IsNotComplete)(ODFacetIterator *somSelf, Environment *ev);
  109. }
  110.  
  111. #endif /* ODFacetIterator_API */
  112.  
  113.  
  114. /*
  115.  * -- This emitter treats Method Tokens as Thunks by default.
  116.  * -- Use the sc modifier "nothunks" to change this default
  117.  */
  118. #undef somresolve_
  119. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  120.  
  121. /*
  122.  * -- The C++ Wrapper Class for ODFacetIterator
  123.  */
  124. class ODFacetIterator : public ODObject
  125. {
  126. public:
  127.  
  128. // ODFacetIterator::new registers use of the class object, and then uses somNew
  129. // to allocate memory and load the object method table pointer. 
  130. void *operator new(size_t size)
  131. {
  132.     SOM_IgnoreWarning(size);
  133.     // Allocate memory using the default allocator for ODFacetIterator, and
  134.     // clear mem & set method table pointer, call basic initialization
  135. #ifdef SOMCHKNULL
  136.     void * __somResult = (void *)
  137.       somNewObject(ODFacetIterator);
  138.     SOMCHKNULL(__somResult);
  139.     return __somResult;
  140. #else
  141.     return (void*) somNewObject(ODFacetIterator);
  142. #endif
  143. }
  144.  
  145. // ODFacetIterator::delete uses the default deallocator for the object's class.
  146. void operator delete(void * obj)
  147. {
  148.     if (obj) {
  149.         SOM_Resolve(obj,SOMObject,somFree)
  150.            ( (SOMObject*) obj );
  151.     }
  152. }
  153.  
  154. /* method: First */
  155. ODFacet*   First(Environment *ev)
  156. {
  157.    #ifdef SOMCHKEXCEPT
  158.    ODFacet* __somResult = 
  159.       SOM_ResolveD(this,ODFacetIterator,ODFacetIterator,First)
  160.     (this,ev);
  161.       SOMCHKEXCEPT;
  162.    return __somResult;
  163. #else
  164.    return SOM_ResolveD(this,ODFacetIterator,ODFacetIterator,First)
  165.     (this,ev);
  166. #endif
  167. }
  168.  
  169. /* method: Next */
  170. ODFacet*   Next(Environment *ev)
  171. {
  172.    #ifdef SOMCHKEXCEPT
  173.    ODFacet* __somResult = 
  174.       SOM_ResolveD(this,ODFacetIterator,ODFacetIterator,Next)
  175.     (this,ev);
  176.       SOMCHKEXCEPT;
  177.    return __somResult;
  178. #else
  179.    return SOM_ResolveD(this,ODFacetIterator,ODFacetIterator,Next)
  180.     (this,ev);
  181. #endif
  182. }
  183.  
  184. /* method: SkipChildren */
  185. void   SkipChildren(Environment *ev)
  186. {
  187.    SOM_ResolveD(this,ODFacetIterator,ODFacetIterator,SkipChildren)
  188.     (this,ev);
  189. #ifdef SOMCHKEXCEPT
  190.       SOMCHKEXCEPT;
  191. #endif
  192. }
  193.  
  194. /* method: IsNotComplete */
  195. ODBoolean   IsNotComplete(Environment *ev)
  196. {
  197.    #ifdef SOMCHKEXCEPT
  198.    ODBoolean __somResult = 
  199.       SOM_ResolveD(this,ODFacetIterator,ODFacetIterator,IsNotComplete)
  200.     (this,ev);
  201.       SOMCHKEXCEPT;
  202.    return __somResult;
  203. #else
  204.    return SOM_ResolveD(this,ODFacetIterator,ODFacetIterator,IsNotComplete)
  205.     (this,ev);
  206. #endif
  207. }
  208.  
  209. };   /* ODFacetIterator */
  210.  
  211.  
  212.  
  213. #endif       /* SOM_ODFacetIterator_xh */
  214.